perf(multichain-account-service): add createAccounts v2 (account batching when supported)#8131
Open
perf(multichain-account-service): add createAccounts v2 (account batching when supported)#8131
createAccounts v2 (account batching when supported)#8131Conversation
8f805c8 to
6d1259e
Compare
716a57a to
16a70a6
Compare
6d1259e to
99d0aa2
Compare
packages/multichain-account-service/src/providers/SolAccountProvider.ts
Outdated
Show resolved
Hide resolved
18c070d to
05ecd6a
Compare
25d09e4 to
957ea19
Compare
6fd4e76 to
fb482ca
Compare
packages/multichain-account-service/src/providers/SolAccountProvider.ts
Outdated
Show resolved
Hide resolved
packages/multichain-account-service/src/providers/SnapAccountProvider.ts
Outdated
Show resolved
Hide resolved
fb482ca to
20605ec
Compare
957ea19 to
222e1eb
Compare
20605ec to
4feb6e9
Compare
packages/multichain-account-service/src/providers/SolAccountProvider.ts
Outdated
Show resolved
Hide resolved
packages/multichain-account-service/src/providers/TrxAccountProvider.ts
Outdated
Show resolved
Hide resolved
…apAccountProvider
createAccounts (account batching when supported)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
packages/multichain-account-service/src/providers/SnapAccountProvider.ts
Outdated
Show resolved
Hide resolved
createAccounts (account batching when supported)createAccounts v2 (account batching when supported)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Implementing proper batching for our Solana account provider.
References
:createMultichainAccountGroupsaction to batch account creation #7801Checklist
Note
Medium Risk
Refactors Snap-based account creation to optionally use the new batched
SnapKeyring.createAccounts, changing how multiple accounts are derived and timeouts/concurrency are applied; incorrect index mapping or Snap behavior differences could affect account creation/discovery.Overview
Adds a configurable v2 path for Snap-based providers to batch BIP-44 account creation via
SnapKeyring.createAccounts, while keeping the existing per-account v1 flow as the default.Refactors
SnapAccountProviderto centralize account-creation logic (createBip44Accounts), add acreateAccounts.v2flag, and exposecreateAccountV1/toBip44Accounthooks so providers can adapt derivation/option handling (notably Solana entropy/derivation path).Updates BTC/SOL/TRX providers and tests to cover both v1 and v2 behaviors (batch vs single calls, range creation, idempotency, timeout handling), and adds a small test helper (
toGroupIndexRangeArray).Written by Cursor Bugbot for commit 087c695. This will update automatically on new commits. Configure here.